/**
 * 
 */
package com.ccqlk.attendance.controller.manage.system;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.ccqlk.attendance.common.page.PageRequest;
import com.ccqlk.attendance.controller.manage.AbstractManageController;
import com.ccqlk.attendance.model.Role;
import com.ccqlk.attendance.repository.service.RoleService;
import com.github.pagehelper.PageInfo;

/**
 * Copyright 2015-2018 重庆鲁控科技有限公司<br>
 * 文件标题: RoleManageController<br>
 * 文件说明: TODO<br>
 * @author ZhangYinxian 348893009@qq.com<br>
 * 创建时间 2016年5月28日 下午11:40:14<br>
 */
@Controller
@RequestMapping("manage/system/role")
public class RoleManageController extends AbstractManageController<Role, Integer> {

	private RoleService roleService;
	
	@Autowired
	public RoleManageController(RoleService roleService) {
		super(roleService, "manage/system/role/", "role");
		this.roleService = roleService;
	}

	/* (non-Javadoc)
	 * @see com.ccqlk.attendance.controller.manage.AbstractManageController#getData(com.ccqlk.attendance.common.page.PageRequest, javax.servlet.http.HttpServletRequest, org.springframework.ui.Model, boolean)
	 */
	@Override
	public PageInfo<Role> getData(PageRequest pageRequest, HttpServletRequest request, Model model, boolean pageable) {
		return roleService.selectAll(pageRequest);
	}

}
